#ifndef __LINEAR_LIST_H
#define __LINEAR_LIST_H

#define LINEAR_LIST_MAX_SIZE    100

/* Linear list elements defined by users */
typedef struct user_linear_list_elment_t {
    int value;
}user_linear_list_elment_t;

typedef struct linear_list_t {
    user_linear_list_elment_t *element;              /* Storage base address */
    unsigned int length;
}linear_list_t;

typedef enum {
    FAIL = 0,
    OK,
}status;

status LinearList_Init(linear_list_t *list);
status LinearList_Deinit(linear_list_t *list);
status LinearList_GetElement(linear_list_t *list, unsigned int index, user_linear_list_elment_t *element);
status LinearList_LocateElement(linear_list_t *list, user_linear_list_elment_t element);
status LinearList_InsertElement(linear_list_t *list, unsigned int index, user_linear_list_elment_t element);
status LinearList_DeleteElement(linear_list_t *list, unsigned int index);
void LinearList_Test(void);

#endif
